<?php

require_once "../core/init.php";
require_once "../core/toro/toro.php";
require_once "../core/mysql/mysql.php";

//404页面
ToroHook::add("404", function() { echo "<h1>404</h1>"; });

//路由
Toro::serve(array(
    '/'                                 =>      'index',                //默认首页
    '/wechat/login'                     =>      'wechat_login',         //微信登录
    '/wechat/login/test'                =>      'wechat_login_test',    //微信登录测试
    '/api/oauth/openid'                 =>      'api_oauth_openid',     //微信授权获取用户openid接口
    '/api/jsticket'                     =>      'api_jsticket',         //微信jsticket获取接口
    '/ftp/([A-Za-z0-9=\+\/]+)'          =>      'ftp',                  //ftp读取文件
    '/test'                             =>      'test'                  //TEST
));